﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;
using YunBox2.Contracts.FoundationModels;
namespace YunBox2.DAL.Maps
{
    public class CarMap:ClassMap<Car>
    {
        public CarMap()
        {
            Id(x => x.Id).GeneratedBy.Guid().Default("(newid())");
            Map(x => x.Name).Length(32).Not.Nullable();
            Map(x => x.PlateNo).Length(56);
            Map(x => x.LastModifiedTime);
            References(x => x.LastModifiedUser).Column("LastModifiedUserID");
            Table("Car");
        }
    }

}
